import { JokerRank, JokerSuit, Rank, Suit } from '../types'

class Card {
  suit: Suit | JokerSuit
  rank: Rank | JokerRank

  constructor(suit: Suit | JokerSuit, rank: Rank | JokerRank) {
    this.suit = suit // 花色 (♠️, ♥️, ♣️, ♦️)
    this.rank = rank // 点数 (2~10, J, Q, K, A)
  }

  toString() {
    return `${this.rank}${this.suit}`
  }
}

export default Card
